module.exports = app => {
    const { router, controller } = app;
    router.get('/', controller.home.index);
    router.get('/databases/loginout', controller.database.loginout);
    router.post('/databases/create', controller.database.init);
    router.get('/databases/search', controller.database.search);
    router.post('/databases/tableBind', controller.database.tableBind);
    router.post('/databases/getTableFields', controller.database.getTableFields);
    router.post('/databases/getTableData', controller.database.getTableData);
    //点击查看leftjoin
    router.post('/databases/ajaxLeftJoin', controller.database.ajaxLeftJoin);

    router.post('/databases/delSubField', controller.database.delSubField);
    router.post('/databases/getBindFields', controller.database.getBindFields);
    router.post('/databases/getDDLByTableName', controller.database.getDDLByTableName);
    router.post('/databases/createTemplate', controller.database.createTemplate);
    router.get('/databases/exportZip', controller.database.exportZip);
    router.get('/databases/connectList', controller.database.connectList);

    router.get('/mock/:tablename/page', controller.mock.page);
    router.get('/mock/:tablename/list', controller.mock.list);
    router.post('/mock/:tablename/add', controller.mock.add);
    router.post('/mock/:tablename/update', controller.mock.update);

    router.post('/story/modify', controller.story.modify);
    router.get('/story/one', controller.story.one);
    router.get('/api/story/one', controller.story.one);
    router.get('/story/list', controller.story.list);
    router.post('/story/createSubStory', controller.story.createSubStory);
    router.post('/story/renderMarke2html', controller.story.renderMarke2html);

    router.post('/story/uploadImage', controller.story.uploadImage);
    router.get('/story/remove', controller.story.remove);

    router.get('/story/translate', controller.story.translate);
    router.get('/story/html2png/:uuid.png', controller.story.html2md5);

};